<template>
  <page-body>
    <view class="page">
     
      <view class="flex benben-position-layout flex flex-wrap align-center military_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub military_fd0_0'>
          <view class='flex flex-wrap align-center military_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  military_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='military_fd0_0_c1_c0'>军事技能详情</text>
          </view>
          <view class='flex flex-wrap align-center justify-end military_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center" v-if="xcxzt==0">

        <video id="myVideo" v-if="introduce.video[0]" class='flex  military_fd1_0' :poster="introduce.video[0].thumb"
          :src="introduce.video[0].path" controls='true' x5-video-player-type="h5" :enable-progress-gesture='true'
          object-fit="fill"></video>
        <image v-else :src="introduce.fmt" style="width: 100%;" mode=""></image>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout military_flex_2">
        <view class='flex flex-wrap align-center military_fd2_0'>
          <text class='military_fd2_0_c0'>{{introduce.kcmc}}</text>
        </view>
        <view class='flex flex-wrap align-center military_fd2_1' v-if='xcxzt==0'>
          <view v-if="tabs_show">
			 <!-- <view class="benben-tabs-title flex flex align-center justify-around">
			  	<view
			  	  :class="{ 'checkTitlefd2_1_c0': tabsVal == 1, 'flex flex-wrap align-center': true }"
			  	  @tap="tabsVal = 1" >
			  	
			  	  <text>简介</text>
			  	
			  	</view>
			  	<view 
			  	  :class="{ 'checkTitlefd2_1_c0': tabsVal ==2, 'flex flex-wrap align-center': true }"
			  	  @tap="tabsVal = 2" >
			  	
			  	  <text>章节</text>
			  	
			  	</view>
			  </view> -->
			 
            <benben-flex-tabs class-name='military_benbenTabsfd2_1_c0' v-model="tabsVal" ref="benben_tabsfd2_1_c0"
              select-mark="benben_tabsfd2_1_c0" key="benben_tabsfd2_1_c0" :open-title-type='false' :open-sticky='false'
              :top='0' :is-show-content='false' :scrollspy='false' :tabs-info.sync="tabsInfofd2_1_c0">

              <scroll-view @scroll="tabsInfofd2_1_c0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd2_1_c0"
                class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left="tabsInfofd2_1_c0.moveX"
                scroll-with-animation="all .3s ease">
                <view class="benben-tabs-content" id="benben_tabsfd2_1_c0-content">
                  <view id="benben_tabsfd2_1_c0-title" class="benben-tabs-title flex flex align-center justify-around">
                    <template v-for='(item,key0) in tabs'>
                      <view :key='key0'
                        :class="{ 'checkTitlefd2_1_c0': tabsVal == item.value, 'flex flex-wrap align-center': true }"
                        @tap="checktab(item.value)" :id="`benben_tabsfd2_1_c0-title-item-${item.value}`">

                        <text>{{item.name}}</text>

                      </view>
                    </template>
                  </view>
                  <view :style="{ left: tabsInfofd2_1_c0.lineleft, maxWidth: tabsInfofd2_1_c0.lineWidth ,}"
                    id="benben_tabsfd2_1_c0-line"
                    class="benben-tabs-line flex benben-flex-tabs-line military_linefd2_1_c0"></view>
                </view>
              </scroll-view>

            </benben-flex-tabs>

          </view>
        </view>
        <view class='flex flex-wrap align-center military_fd2_2' v-if=" tabsVal=='1'">
          <jyf-parser class='military_fd2_2_c0' :html="introduce.kcjj | richTextFormat">
          </jyf-parser>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout military_flex_3" v-if=" tabsVal=='2'">
        <template v-for='(item,key0) in list'>
          <view class='flex flex-direction flex-wrap align-stretch military_fd3_0' :key='key0'>
				<view class="">
				  	<view  class="flex not an flex align-center military_notAnfd3_0_c0_c0" @click="checkopen(key0)">

						<view class='flex flex align-center justify-center flex-sub military_notAnfd3_0_c0_c0_c0'>
						  <text class='flex-sub military_notAnfd3_0_c0_c0_c0_c0'>{{item.zjmc}}</text>
						</view>

						<view class='flex flex align-center justify-center military_notAnfd3_0_c0_c0_c1'>
						  <text v-if="item.isOpen" class='fu-iconfont2  military_notAnfd3_0_c0_c0_c1_c0'>&#xE78A;</text>
						 <text v-else class='fu-iconfont2  military_anfd3_0_c0_c0_c1_c0'>&#xE7ED;</text>
						</view>

					  </view>
				  </view>
            <view class="flex area flex military_areafd3_0_c0_c0" v-if="item.isOpen">
            
              <view class='flex flex-direction align-center flex-sub flex military_areafd3_0_c0_c0_c0'>
                <template v-for='(child,key1) in item.child' >
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='mp4'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/49.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c0_c0_c1' @tap.stop="handleJumpDiy"
                        data-type="navigateTo"
                        :data-url="`/pageguofang/honoDeta/militaryMp/militaryMp?aid=${child.aid}`">观看</button>
                 
                    </view>
                   
                  </view>
            
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='ppt'||child.file_type=='pptx'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/61.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                        @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                    </view>
                    
                  </view>
            
            
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='doc'||child.file_type=='docx'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/60.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                        @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                    </view>
                  </view>
            
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='pdf'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/59.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                        @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                    </view>
                    
                  </view>
            
            
                </template>
                <template v-for='(child,key1) in item.list'>
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='ppt'||child.file_type=='pptx'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/61.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                        @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                    </view>
                 
                  </view>
                </template>
            
                <template v-for='(child,key1) in item.list'>
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='doc'||child.file_type=='docx'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/60.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                        @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                    </view>
                    
                  </view>
                </template>
            
                <template v-for='(child,key1) in item.list'>
                  <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                    v-if=" child.file_type=='pdf'" :key='key1'>
                    <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                      <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                        <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                          :src='STATIC_URL+"guofang/59.png"'></image>
                        <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                      </view>
                      <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                        @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                    </view>
                  
                  </view>
                </template>
            
              </view>
            
            </view>
			<benben-flex-collapse class='flex flex flex-direction'>


              <benben-collapse-item name="CollapseItem1724918119424" :border='true'>
				  
               <!-- <template #title="{isOpen,disabled}">
                  <view v-if="!isOpen" class="flex not an flex align-center military_notAnfd3_0_c0_c0"
                    :class="disabled?'benben-collapse-disabled':''">

                    <view class='flex flex align-center justify-center flex-sub military_notAnfd3_0_c0_c0_c0'>
                      <text class='flex-sub military_notAnfd3_0_c0_c0_c0_c0'>{{item.zjmc}}</text>
                    </view>

                    <view class='flex flex align-center justify-center military_notAnfd3_0_c0_c0_c1'>
                      <text class='fu-iconfont2  military_notAnfd3_0_c0_c0_c1_c0'>&#xE78A;</text>
                    </view>

                  </view>
                  <view v-if="isOpen" class="flex an flex align-center military_notAnfd3_0_c0_c0"
                    :class="disabled?'benben-collapse-disabled':''">

                    <view class='flex flex align-center justify-center flex-sub military_notAnfd3_0_c0_c0_c0'>
                      <text class='flex-sub military_notAnfd3_0_c0_c0_c0_c0'>{{item.zjmc}}</text>
                    </view>

                    <view class='flex flex align-center justify-center military_notAnfd3_0_c0_c0_c1'>
                      <text class='fu-iconfont2  military_anfd3_0_c0_c0_c1_c0'>&#xE7ED;</text>
                    </view>

                  </view>
                </template> -->
                <template #line>
                  <view class="flex line  military_linefd3_0_c0_c0"></view>
                </template>
                <template #content>
                  <view class="flex area flex military_areafd3_0_c0_c0" v-if="item.isOpen">

                    <view class='flex flex-direction align-center flex-sub flex military_areafd3_0_c0_c0_c0'>
                      <template v-for='(child,key1) in item.child' >
                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='mp4'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/49.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c0_c0_c1' @tap.stop="handleJumpDiy"
                              data-type="navigateTo"
                              :data-url="`/pageguofang/honoDeta/militaryMp/militaryMp?aid=${child.aid}`">观看</button>
                       
                          </view>
                         
                        </view>

                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='ppt'||child.file_type=='pptx'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/61.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                              @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                          </view>
                          
                        </view>


                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='doc'||child.file_type=='docx'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/60.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                              @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                          </view>
                        </view>

                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='pdf'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/59.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                              @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                          </view>
                          
                        </view>


                      </template>
                      <template v-for='(child,key1) in item.list'>
                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='ppt'||child.file_type=='pptx'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/61.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                              @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                          </view>
                       
                        </view>
                      </template>

                      <template v-for='(child,key1) in item.list'>
                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='doc'||child.file_type=='docx'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/60.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                              @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                          </view>
                          
                        </view>
                      </template>

                      <template v-for='(child,key1) in item.list'>
                        <view class='flex flex-direction align-stretch justify-around military_areafd3_0_c0_c0_c0_c0'
                          v-if=" child.file_type=='pdf'" :key='key1'>
                          <view class='flex flex-wrap align-center justify-between military_areafd3_0_c0_c0_c0_c0_c0'>
                            <view class='flex flex-wrap align-center military_areafd3_0_c0_c0_c0_c0_c0_c0'>
                              <image class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c0' mode="aspectFit"
                                :src='STATIC_URL+"guofang/59.png"'></image>
                              <text class='military_areafd3_0_c0_c0_c0_c0_c0_c0_c1'>{{child.zlmc}}</text>
                            </view>
                            <button class='military_areafd3_0_c0_c0_c0_c1_c0_c1'
                              @tap.stop="seePdf(child.file[0].path,child.aid)">查看</button>
                          </view>
                        
                        </view>
                      </template>

                    </view>

                  </view>
                </template>
              </benben-collapse-item>


            </benben-flex-collapse>

          </view>
        </template>

      </view>

      <!---flex布局flex布局结束-->
      <!--  <view class="flex flex-wrap align-start justify-center benben-position-layout flex military_flex_4"
        :style="{height:(170+bottomSafeAreaRpx)+'rpx',paddingBottom:bottomSafeAreaRpx+'rpx', }">
        <button class='military_fd4_0' @tap.stop="getyy481b1f1a9d27Func()" v-if=" introduce.study=='1'">加入课程</button>
        <button class='military_fd4_1' @tap.stop="gethr4d5e4added2aFunc()" v-if=" introduce.study==0">取消课程</button>

      </view> -->
      <view :style="{height: (170+bottomSafeAreaRpx)+'rpx'}"></view>


    </view>
  </page-body>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
		  isOpen:false,
		  disabled:false,
        "time": "",
        "tabsInfofd2_1_c0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "tabs": [{
          "name": "简介",
          "value": 1,
          "image": ""
        }, {
          "name": "章节",
          "value": 2,
          "image": ""
        }],
        tabs_show: false,
        "tabsVal": 1,
        "tabsLab": "",
        "list": [],
        "introduce": {
          "aid": "",
          "name": "",
          "thumb": "",
          "brief": "",
          "video": "",
          "course_name": "",
          "is_study": "",
          "study": "",
          "video_thumb": "",
          "video_url": "",
			kcjj:'',
        },
        "course_id": "",
				xcxzt:1,//1上 0未 
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      let {
        course_id
      } = options
      if (course_id !== undefined) this.course_id = course_id

    },
    onUnload() {
      this.videoContext && this.videoContext.stop();
    },
    onReady() {
      this.videoContext = uni.createVideoContext('myVideo', this);
    },
    onShow() {
      let that = this
      setTimeout(() => {
        that.tabs_show = true
      }, 500)
			this.getzt()
      this.getvg6bdd983a7c50Func()
      this.getmv47ed860f3e45Func()
    },
    onHide() {
      this.videoContext && this.videoContext.stop();
    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
			async getzt(){
				let info = await this.$api.get(global.apiUrls.post64534cbb2c352, {
					code: 'app_grounding_status'
				});
				console.log(info.data.data)
				// console.log(this)
				this.xcxzt=info.data.data
				// #ifndef MP-WEIXIN
				this.xcxzt=0
				//  #endif
				// this.xcxzt=0
			},
		checkopen(indexs){
			console.log(indexs)
			this.list.map((item,index)=>{
				if(index == indexs){
					item.isOpen=!item.isOpen
				}else{
					item.isOpen=false
				}
				
			})
			console.log(this.list)
			this.list.splice(indexs,1,this.list[indexs])
		},
		
		checktab(index){
			this.tabsVal=index
		},

      // 打开学习资料
      seePdf(file, aid) {
        let _this = this;
        let id = aid;
        let url = file;
        // let files = uni.getStorageSync('files') ? JSON.parse(uni.getStorageSync('files')) : {}
        // console.log(files)
        // #ifdef APP-PLUS

        let files = uni.getStorageSync('files') ? JSON.parse(uni.getStorageSync('files')) : {}
        console.log(files)
        if (files[id]) {
          // 已下载的文件直接打开
          plus.runtime.openFile(files[id], {}, (res) => {
            console.log("res=>", res);
            // downloadFile()
          })
        } else {
          downloadFile()
        }

        function downloadFile() {
          uni.showLoading({
            title: '加载中'
          })
          const dtask = plus.downloader.createDownload(url, {}, function(d, status) {
            if (status == 200) {
              console.log('保存成功')
              // _this.addRecord();
              uni.hideLoading();
              //下载成功,d.filename是文件在保存在本地的相对路径，使用下面的API可转为平台绝对路径
              //const fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
              files[id] = d.filename
              uni.setStorageSync('files', JSON.stringify(files))
              plus.runtime.openFile(d.filename) //选择软件打开文件
            } else {
              //下载失败
              plus.downloader.clear() //清除下载任务
              uni.hideLoading();
              uni.showToast({
                title: '文档加载失败，请稍后再试',
                icon: 'none',
              })
            }
          })
          dtask.start()
        }
        // #endif

        // #ifdef H5
        window.open(url)
        // #endif
        // this.fileUrl = file[0].path;
        // this.showPreview = true;
        // let _this = this;
        // _this.means_id = aid;
        // uni.showLoading({
        // 	title: '加载中...'
        // })

        // uni.downloadFile({
        // 	url: file[0].path,
        // 	success: function(res) {
        // 		var filePath = res.tempFilePath;
        // 		uni.hideLoading();
        // 		uni.openDocument({
        // 			filePath: filePath,
        // 			showMenu: true,
        // 			success: function(res) {
        // 				console.log('打开文档成功');
        // 			}
        // 		});
        // 	},
        // 	fail: function(err) {
        // 		uni.hideLoading();
        // 		uni.showToast({
        // 			title: '文档加载失败，请重试',
        // 			icon: 'none'
        // 		})
        // 	}
        // });
      },

      // /* 添加学习记录*/
      // async addRecord() {
      //   let data64910ea324123 = await this.$api.post(global.apiUrls.post64910ea324123, {
      //     means_id: this.aid,
      //     demand: this.time
      //   })
      //   console.log("触发了=>", data64910ea324123)
      //   if (data64910ea324123.data.code != 1) {
      //     this.$message.info(data64910ea324123.data.msg);
      //     return
      //   }
      // },



      //查询课程介绍
      async getvg6bdd983a7c50Func() {
        //请求方法
        //数据验证

        let dataintroduce = await this.$api.get(global.apiUrls.post66e3ab495560b, {
          aid: this.course_id
        });

        if (dataintroduce.data.code != 1) {
          this.$message.info(dataintroduce.data.msg);
          return
        }
        let infointroduce = dataintroduce.data;
        console.log("this.introduce=>", this.introduce)
        this.introduce = infointroduce.data

      },
      //查询课程章节
      async getmv47ed860f3e45Func() {
        //请求方法
        //数据验证

        let datalist = await this.$api.post(global.apiUrls.post66e3b20703d2d, {
          course_id: this.course_id
        });

        if (datalist.data.code != 1) {
          this.$message.info(datalist.data.msg);
          return
        }
        let infolist = datalist.data.data;
        this.list = infolist.data
		this.list.map(item=>{
			item.isOpen=false
		})
		console.log('0000000000000000')
        console.log("this.list=>", this.list)
      },
      // //添加学习课程
      // async getyy481b1f1a9d27Func() {
      //   //请求方法
      //   //数据验证

      //   let data6481b1f1a9d27 = await this.$api.post(global.apiUrls.post6481b1f1a9d27, {
      //     course_id: this.course_id
      //   });

      //   if (data6481b1f1a9d27.data.code != 1) {
      //     this.$message.info(data6481b1f1a9d27.data.msg);
      //     return
      //   }
      //   let info6481b1f1a9d27 = data6481b1f1a9d27.data;


      //   this.getvg6bdd983a7c50Func()
      //   this.getmv47ed860f3e45Func()
      //   if (this.$util.antiShakeThrottle()) return
      // },
      // //用户取消学习课程
      // async gethr4d5e4added2aFunc() {
      //   //请求方法
      //   //数据验证

      //   let data64d5e4added2a = await this.$api.post(global.apiUrls.post64d5e4added2a, {
      //     aid: this.course_id
      //   });

      //   if (data64d5e4added2a.data.code != 1) {
      //     this.$message.info(data64d5e4added2a.data.msg);
      //     return
      //   }
      //   let info64d5e4added2a = data64d5e4added2a.data;


      //   this.getvg6bdd983a7c50Func()
      //   this.getmv47ed860f3e45Func()
      //   if (this.$util.antiShakeThrottle()) return
      // }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F6F6F6;
    background-size: 100% auto;
  }

  .military_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    position: fixed;
    // top: -60rpx;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .military_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .military_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .military_fd0_0_c0 {
    width: 120rpx;
    height: 60rpx;
    // background-color: red;
  }

  .military_fd0_0 {
   padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .military_fd1_0 {
    width: 750rpx;
    height: 360rpx;
  }

  .military_flex_2 {
    padding: 24rpx 24rpx 0rpx 24rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  ::v-deep .military_fd2_2_c0 {
    width: 100%;
  }

  .military_fd2_2 {
    background: #fff;
    border-radius: 16rpx;
    background-size: 100% auto;
    padding: 30rpx 24rpx 30rpx 24rpx;
    margin: 0rpx 0rpx 034rpx 0rpx;
  }

  .military_linefd2_1_c0 {
    background: #d53215;
    width: 40rpx;
    height: 8rpx;
    top: 80rpx;
    background-size: 100% auto !important;
  }

  .checkTitlefd2_1_c0 {
    font-weight: 700 !important;
    font-size: 28rpx !important;
    color: #333 !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  ::v-deep .military_benbenTabsfd2_1_c0 {
    background: #fff;
    width: 90%;
    height: 90rpx;
    white-space: nowrap;
    text-align: center;
    border-radius: 16rpx;
  }

  .military_fd2_1 {
    background: #fff;
    margin: 0 0rpx 24rpx 0rpx;
    border-radius: 16rpx;
    background-size: 100% auto;
    width: 100%;
    height: 108rpx;
  }

  .military_fd2_0_c0 {
    color: rgba(51, 51, 51, 1);
    font-size: 32rpx;
    line-height: 40rpx;
    font-weight: 500;
  }

  .military_fd2_0 {
    background: #fff;
    border-radius: 16rpx;
    background-size: 100% auto;
    padding: 24rpx;
    height: 104rpx;
	margin-bottom: 24rpx;
  }

  .military_flex_3 {
    margin: 0rpx 24rpx 0 24rpx;
	background-color: #ffffff;
	border-radius: 8px;
  }

  .military_areafd3_0_c0_c0_c0_c1_c0_c1 {
    border: 1px solid rgba(225, 74, 64, 1);
    background: #faf4e9;
    border-radius: 33rpx 33rpx 33rpx 33rpx;
    width: 120rpx;
    line-height: 48rpx;
    font-size: 24rpx;
    color: rgba(204, 34, 28, 1);
  }

  .military_areafd3_0_c0_c0_c0_c0_c1_c2 {
    font-size: 24rpx;
    color: rgba(172, 179, 185, 1);
  }

  .military_progress1_areafd3_0_c0_c0_c0_c0_c1_c1 {
    background: rgba(225, 74, 64, 1);
    border-radius: 10rpx 10rpx 10rpx 10rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0_c1_c1 {
    background: #f6f7f9;
    width: 300rpx;
    height: 20rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    background-size: 100% auto;
  }

  .military_areafd3_0_c0_c0_c0_c0_c1_c0 {
    font-size: 24rpx;
    line-height: 33rpx;
    font-weight: 400;
    color: rgba(172, 179, 185, 1);
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0_c1 {
    margin: 0rpx 0rpx 10rpx 0rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0_c0_c1 {
    background: rgba(225, 74, 64, 1);
    border-radius: 33rpx 33rpx 33rpx 33rpx;
    width: 120rpx;
    line-height: 48rpx;
    font-size: 24rpx;
    color: #fff;
  }

  .military_areafd3_0_c0_c0_c0_c0_c0_c0_c1 {
    margin: 0rpx 0rpx 0rpx 16rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    font-size: 28rpx;
    font-weight: 500;
    line-height: 40rpx;
    width: 400rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0_c0_c0_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0_c0_c0 {
    width: 500rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0_c0 {
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .military_areafd3_0_c0_c0_c0_c0 {
    border-bottom: 1px solid #eee;
    width: 100%;
    height: 170rpx;
  }

  .military_areafd3_0_c0_c0_c0 {
    width: 100%;
  }

  .military_anfd3_0_c0_c0_c1_c0 {
    color: rgb(187, 187, 187);
    font-size: 28rpx;
    transform: scale(0.5);
    margin: 0rpx 10rpx 0rpx 10rpx;
  }

  .military_notAnfd3_0_c0_c0_c1_c0 {
    color: rgba(187, 187, 187, 1);
    font-size: 28rpx;
    transform: scale(0.5);
    margin: 0rpx 10rpx 0rpx 10rpx;
  }

  .military_notAnfd3_0_c0_c0_c1 {
    height: 100%;
    width: 60rpx;
  }

  .military_notAnfd3_0_c0_c0_c0_c0 {
    padding: 0rpx 15rpx 0rpx 15rpx;
    font-weight: 400;
    font-size: 28rpx;
    color: rgb(16, 16, 16);
    line-height: 40rpx;
    text-decoration: none;
  }

  .military_notAnfd3_0_c0_c0_c0 {
    height: 100%;
  }

  .military_linefd3_0_c0_c0 {
    background: #ebeef5;
    width: 100%;
    height: 1rpx;
    margin: 10rpx 0rpx 10rpx 0rpx;
    transform: scaleY(0.5);
  }

  .military_areafd3_0_c0_c0 {
    min-height: 80rpx;
  }

  .military_notAnfd3_0_c0_c0 {
    height: 96rpx;
  }

  .military_fd3_0 {
    background: #fff;
	border-radius: 8px;
    background-size: 100% auto;
    padding: 0rpx 24rpx 30rpx 24rpx;
  }

  .military_flex_4 {
    background: transparent;
    width: 750rpx;
    height: 170rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
    background-size: 100% auto;
  }

  .military_fd4_1 {
    background: #ffffff;
    border-radius: 45rpx;
    width: 638rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor0);
    margin: 20rpx 0rpx 0rpx 0rpx;
  }

  .military_fd4_0 {
    background: rgba(225, 74, 64, 1);
    border-radius: 45rpx;
    width: 638rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }
</style>
